﻿using System;
using ParserGenerator.CharacterMapping;

namespace ParserGenerator.ScannerConstruction
{
    [Serializable]
    public sealed class ScannerAutomatonShift : ScannerAutomatonItem
    {
        public CharClass Symbol { get; }

        internal ScannerAutomatonShift(int number, CharClass symbol)
            : base(number)
        {
            if (symbol == null)
                throw new ArgumentNullException(nameof(symbol));
            Symbol = symbol;
        }

        public sealed override string ToString()
        {
            return base.ToString() + " " + Symbol;
        }
    }
}
